$(document).ready(function() {
				$(".i-checks").iCheck({
					checkboxClass: "icheckbox_square-green",
					radioClass: "iradio_square-green",
				})
		}) ;
$(function() {
			$("button").click(function() { 
				var vals = $("input[name=a]:checked").val(); 
				if(vals == null || vals == "") {
					//没有选择默认为教师
					alert("没有选中");
					alert(vals);
				} else {
					var names = $("input").val();
					var password = $("input[type=password]").val();
					console.log(names + "  " + password + "  " + vals);
					 $.post("php/login.php",{
					 	TMuer:names,
					 	Aduerpwd:password,
					 	TMClassify:vals
					 },function(data){ 
					 	data=JSON.parse(data);
					 	if(data.status=="200")
					 	{
					 	var	tpl="";
					 		//每一次存之前把前面存储过的都清空
					 		sessionStorage.setItem("TMid","");
					 		alert("登陆成功");
					 		window.location.href="index.html";
							sessionStorage.setItem("TMid",data.msg[0].TMClassify);
					 		
					 	}else if(data.status=="600")
					 	{
					 		alert("你没有此权限");
					 	}else if(data.status=="50")
					 	{
					 		alert("账户错误");
					 	}else
					 	{
					 		alert("程序错误")
					 	}
					 	
					 });
					 
				}

			});
		});